//
// Created by hsj on 2022/3/8.
//
#include <iostream>
#include <string>
#include <memory>
#ifndef CLION_CPP_T_AUTO_PTR_H
#define CLION_CPP_T_AUTO_PTR_H
/**
 * 测试智能指针
 * [必须显示初始化]
 */
namespace t_auto_ptr_test{
    using std::string;
    using std::endl;
    using std::cin;
    using std::cout;

    class Report{
        private:
            string str;
    public:
        Report(const string &s):str(s){cout<<"Object Created."<<endl;}
        ~Report(){cout<<"Object deleted."<<endl;}
        //打印输出
        void comment()const{
            cout<<str<<endl;
        }
    };

    //测试代码
    void test();
}
#endif //CLION_CPP_T_AUTO_PTR_H
